﻿using System.Diagnostics;
using System.IO;
using System.Security.Permissions;

namespace HeritageAcademy.Shared
{
    public static class IOHelper
    {
        // TODO: solve Microsoft.Security - CA2122 Do not indirectly expose methods with link demands
        public static string ApplicationSourceRootPath
        {
            get
            {
                return Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName).Replace(@"bin\Debug", "");
            }
        }

        // TODO: solve Microsoft.Security - CA2122 Do not indirectly expose methods with link demands
        public static string ApplicationExecutablePath
        {
            get
            {
                return Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
            }
        }
    }
}
